package com.fz.study.project.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author fang
 * @Date 2024/3/1 9:50
 * @注释  redisson配置类
 */
@Configuration
public class RedissonCon {
    @Bean
    public RedissonClient redissonClient(){
//        配置
        Config config = new Config();
        config.useSingleServer().setAddress("redis://81.70.16.37:6379").setPassword("CSSnet1@3");
//        创建redissonClient对象
        return Redisson.create(config);
    }
}
